<?php
class users extends SClass {

    public function process() {
        $users = ServiceUtils::GetFactory()->getUserService()->getUsersAll();
        $usersArray = array();
        
        while ($x = $users->getNext()) {
        	$usersArray[] = array(
        	   'id' => $x->getId(),
        	   'login' => $x->getLogin(),
        	   'name' => $x->getName(),
        	   'level' => $x->getLevel(),
        	   'delete' => Engine_LinkMaker::GetURLByContentID('controlpanel-users-delete', $x->getId()),
        	   'edit' => Engine_LinkMaker::GetURLByContentID('controlpanel-users-edit', $x->getId())
        	);
        }
        
        $this->assign('usersArray', $usersArray);
    }

}